#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>

int main()
{
	pid_t id=fork();
	if(id==0)
	{
		while(1)
		{
			printf("i am child,my pid:%d,my ppid :%d\n",getpid(),getppid());	
			sleep(1);
		}

	}
	else if(id>0)
	{
		while(1)
		{
			printf("i am father,my pid:%d,my ppid :%d\n",getpid(),getppid());	
			sleep(1);
		}
	}

	return 0;

}
